import { schoolMessageApi } from "../../api/application";
import {ref} from "vue"
import { onMounted } from "vue";

export const schoolMessageList = () => {
  const data = ref([])

  const loadData = async ( ) => {
    let ret = await schoolMessageApi()
    if (ret.code === 0) {
      data.value = ret.data.users
    }
  }

  onMounted(() => {
    loadData()
  })

  return [data, loadData]
}